package guice.boot.archive.spi.service;

/**
 * {@code PriorityOrdered} is an interface that can be implemented by objects that should be ordered.
 */
public interface PriorityOrdered {
    /**
     * Default priority
     */
    int DEFAULT_PRECEDENCE = 100;
    /**
     * Useful constant for the highest precedence value.
     *
     * @see java.lang.Integer#MIN_VALUE
     */
    int HIGHEST_PRECEDENCE = Integer.MIN_VALUE;
    /**
     * Useful constant for the lowest precedence value.
     *
     * @see java.lang.Integer#MAX_VALUE
     */
    int LOWEST_PRECEDENCE = Integer.MAX_VALUE;

    /**
     * Get the order value of this object. Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority.
     */
    int getPriority();
}